/*
 * FlopolConstant.java
 *
 * Copyright (C) 2013 UPOU.
 * IS214 - Programming Languages
 * All Rights Reserved.
 *
 * @author Mary Joy Pascual and Simon Zagado
 */

package com.upittc.flopol.constant;

import java.util.HashMap;
import java.util.Map;

public class FlopolConstant {
	
	public static final String FLOPOL = "FLOPOL";

	//TOKENS
	public static final int COMNT		= 100;
	public static final int IDENT		= 110;
	
	public static final int FLT_LIT 	= 200;
	public static final int STR_LIT 	= 201;
	public static final int BOL_LIT 	= 202;

	public static final int NUM_OP		= 300;
	public static final int REL_OP 		= 301;
	public static final int LOG_OP 		= 302;
	public static final int UNARY_OP  	= 303;
	public static final int NOT_OP  	= 304;
	public static final int EQNEQ_OP  	= 305;
	
	public static final int FLOP_KEY	= 400;
	public static final int CREATE_KEY	= 401;
	public static final int END_KEY		= 402;
	public static final int IS_KEY		= 403;
	public static final int MAN_KEY		= 404;
	public static final int GIVE_KEY	= 405;
	public static final int GVMR_KEY	= 406;
	public static final int BEG_KEY		= 407;
	public static final int INTO_KEY	= 408;
	public static final int CHECK_KEY   = 409;
	public static final int TO_KEY 	    = 410;
	public static final int BUT_KEY     = 411;
	public static final int TIMES_KEY   = 412;
	public static final int PERFORM_KEY = 413;	
	
	public static final int FLT_KEY		= 450;
	public static final int STR_KEY		= 451;
	public static final int BOL_KEY		= 452;
	
	public static final int L_BR		= 500;
	public static final int R_BR		= 501;
	
	public static final int EOFF		= 0;
	
	
	//COMMENT
	public static final char ASTERISK 	= '*';
	
	//STRING 
	public static final char DOLLAR 	= '$';
	
	//SCOPE
	public static final char LEFT_BRA	= '[';
	public static final char RIGHT_BRA	= ']';
	
	//OTHERS
	public static final char SPACE 		= ' ';
	public static final char NEW_LINE 	= '\n';
	public static final char TAB		= '\t';
	public static final char QUESTION	= '?';
	public static final char PERIOD		= '.';
	public static final String NL		= "\n";
	public static final String SP		= " ";

	//KEYWORDs
	public static final String FLOP     = "FLOP";
	public static final String CREATE   = "CREATE";
	public static final String END		= "END";
	public static final String IS		= "IS";
	public static final String MANEUVER = "MANEUVER";
	public static final String GIVE     = "GIVE";
	public static final String GIVEMORE = "GIVEMORE";
	public static final String BEG		= "BEG";
	public static final String INTO		= "INTO";
	
	//VARIABLE AND DATA TYPES
	public static final String FLOAT   	= "FLOAT";
	public static final String STRING  	= "STRING";
	public static final String BOOL    	= "BOOL";
	
	//NUMERIC
	public static final String ADD     	= "ADD";
	public static final String SUB     	= "SUB";
	public static final String MULT    	= "MULT";
	public static final String DIVI	   	= "DIVI";
	public static final String PING    	= "PING";
	public static final String EXP     	= "EXP";
	public static final String REMI	   	= "REMI";
	
	//NUMERIC PREDICATES
	public static final String GT	   	= "GT?";
	public static final String GTE	   	= "GTE?";
	public static final String LT	   	= "LT?";
	public static final String LTE	   	= "LTE?";
	public static final String EQ	   	= "EQ?";
	public static final String NEQ	   	= "NEQ?";
	
	//LOGICAL OPERATIONS
	public static final String INTER   	= "INTER";
	public static final String UNION   	= "UNION";
	public static final String NOT     	= "NON";

	//CONTROL STRUCTURE
	public static final String CHECK   	= "CHECK";
	public static final String TO 	  	= "TO";
	public static final String BUT	  	= "BUT";
	public static final String TIMES  	= "TIMES";
	public static final String PERFORM 	= "PERFORM";
	
	//BOOLEAN LITERALS
	public static final String YEAH    	= "YEAH";
	public static final String NOPE    	= "NOPE";

	public static final String EOF    	= "~";
	
	//FLAG 
	public static final int GLOBAL_VAR	= 0;
	public static final int ASSIGN_VAR 	= 1;

	//FOR DISPLAY PURPOSES ONLY (NOT NEEDED IN THE ACTUAL PARSER!!!)
	public static final Map <Integer, String> tokenMap = new HashMap<Integer , String>() {
		private static final long serialVersionUID = 7010918415605948021L;
	{
	    put(IDENT   , "IDENT"	);
	    put(FLT_LIT , "FLT_LIT"	);
	    put(STR_LIT , "STR_LIT"	);
	    put(BOL_LIT , "BOL_LIT"	);
	    put(NUM_OP  , "NUM_OP"	);
	    put(REL_OP  , "REL_OP"	);
	    put(LOG_OP  , "LOG_OP"	);
	    put(FLOP_KEY, "FLOP_KEY");
	    put(END_KEY , "END_KEY"	);
	    put(IS_KEY  , "IS_KEY"	);
	    put(MAN_KEY , "MAN_KEY"	);
	    put(GIVE_KEY, "GIVE_KEY");
	    put(GVMR_KEY, "GVMR_KEY");
	    put(BEG_KEY , "BEG_KEY" );
	    put(INTO_KEY, "INTO_KEY");
	    put(TO_KEY  , "TO_KEY"  );
	    put(BUT_KEY , "BUT_KEY" );
	    put(FLT_KEY , "FLT_KEY" );
	    put(STR_KEY , "STR_KEY" );
	    put(BOL_KEY , "BOL_KEY" );
	    put(L_BR    , "L_BR"    );
	    put(R_BR    , "R_BR"    );
	    put(UNARY_OP   , "UNARY_OP"  );
	    put(TIMES_KEY  , "TIMES_KEY" );
	    put(CHECK_KEY  , "CHECK_KEY" );
	    put(CREATE_KEY , "CREATE_KEY");
	    put(PERFORM_KEY, "PERFORM_KEY");
	}};

	//SUCCESS MESSAGE
	public static final String SUCCESS = "\nRun Successful.";
}

